Simulation #1

Data structure: \(O = (W, A, Z, Y)\)

  • U - exogenous variables
  • W - baseline covariate that is a measure of body condition
  • A - treatment level based on W, continuous between 0 and 5
  • Z - intermediate curve based on W and A
  • Y - outcome, indicator of an event ?

Underlying data generating process, \(P_{U,X}\)

  • Exogenous variables:
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 1^2)\)
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 2^2)\)
    • \(U_Z \sim Uniform(min = 0, max = 1)\)
    • \(U_Y \sim Uniform(min = 0, max = 1)\)
  • Structural equations F and endogenous variables:
    • \(W = U_W\)
    • \(A = bound(2 - 0.5W + U_A, min=0, max=5)\)
    • \(Z = \mathbf{I}[U_Z < expit(2-W-A)]\)
    • \(Y = \mathbf{I}[U_Y < expit(W + 5*A + Z - 0.5 * W * A - 8)]\)
##        W                  A               Z                Y         
##  Min.   :-3.53309   Min.   :0.000   Min.   :0.0000   Min.   :0.0000  
##  1st Qu.:-0.67527   1st Qu.:0.627   1st Qu.:0.0000   1st Qu.:0.0000  
##  Median :-0.01628   Median :2.023   Median :0.0000   Median :1.0000  
##  Mean   : 0.00034   Mean   :2.137   Mean   :0.4856   Mean   :0.6036  
##  3rd Qu.: 0.66792   3rd Qu.:3.447   3rd Qu.:1.0000   3rd Qu.:1.0000  
##  Max.   : 3.82962   Max.   :5.000   Max.   :1.0000   Max.   :1.0000
## Summary of A given W < -1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   1.485   2.796   2.746   4.188   5.000
## Summary of A given -1 < W <= 0:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.9367  2.2983  2.3246  3.6511  5.0000
## Summary of A given 0 < W <= 1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.4553  1.7583  1.9538  3.1786  5.0000
## Summary of A given 1 < W:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   0.000   1.222   1.511   2.543   5.000

n = 200

results

## Initial lambda mean: 0.008063207
## The selected undersmoothed lambda mean: 0.0001128359
## The scaler picked: 0.01366887

psi(a=0.5, z= 1)

psi(a=5, z= 1)

psi(a=0.5, z= 0)

Estimating ATE(0.5, 0) with z = 0

psi(a=5, z= 0)

Simulation #1_1

[Same as Simulation #1, but with posibility violation as the variance of U_A decreased]
Data structure: \(O = (W, A, Z, Y)\)

  • U - exogenous variables
  • W - baseline covariate that is a measure of body condition
  • A - treatment level based on W, continuous between 0 and 5
  • Z - intermediate curve based on W and A
  • Y - outcome, indicator of an event ?

Underlying data generating process, \(P_{U,X}\)

  • Exogenous variables:
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 1^2)\)
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 1^2)\)
    • \(U_Z \sim Uniform(min = 0, max = 1)\)
    • \(U_Y \sim Uniform(min = 0, max = 1)\)
  • Structural equations F and endogenous variables:
    • \(W = U_W\)
    • \(A = bound(2 - 0.5W + U_A, min=0, max=5)\)
    • \(Z = \mathbf{I}[U_Z < expit(2-W-A)]\)
    • \(Y = \mathbf{I}[U_Y < expit(W + 5*A + Z - 0.5 * W * A - 8)]\)
##        W                   A               Z               Y         
##  Min.   :-4.039777   Min.   :0.000   Min.   :0.000   Min.   :0.0000  
##  1st Qu.:-0.687173   1st Qu.:1.217   1st Qu.:0.000   1st Qu.:0.0000  
##  Median :-0.015235   Median :1.973   Median :0.000   Median :1.0000  
##  Mean   :-0.006659   Mean   :1.993   Mean   :0.499   Mean   :0.6582  
##  3rd Qu.: 0.659240   3rd Qu.:2.731   3rd Qu.:1.000   3rd Qu.:1.0000  
##  Max.   : 4.256538   Max.   :5.000   Max.   :1.000   Max.   :1.0000
## Summary of A given W < -1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   2.013   2.671   2.701   3.362   5.000
## Summary of A given -1 < W <= 0:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   1.511   2.219   2.220   2.906   5.000
## Summary of A given 0 < W <= 1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   1.060   1.746   1.770   2.436   5.000
## Summary of A given 1 < W:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.5197  1.1890  1.2479  1.8568  4.8720

n = 200

results

## Initial lambda mean: 0.01013305

psi(a=0.5, z= 1)

psi(a=2.5, z= 1)

psi(a=5, z= 1)

psi(a=0.5, z= 0)

Estimating ATE(0.5, 0) with z = 0

psi(a=2.5, z= 0)

Estimating ATE(0.5, 0) with z = 0

psi(a=5, z= 0)

Simulation #1_2

[Same as Simulation #1, but with a 3-way interaction]
Data structure: \(O = (W, A, Z, Y)\)

  • U - exogenous variables
  • W - baseline covariate that is a measure of body condition
  • A - treatment level based on W, continuous between 0 and 5
  • Z - intermediate curve based on W and A
  • Y - outcome, indicator of an event ?

Underlying data generating process, \(P_{U,X}\)

  • Exogenous variables:
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 1^2)\)
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 2^2)\)
    • \(U_Z \sim Uniform(min = 0, max = 1)\)
    • \(U_Y \sim Uniform(min = 0, max = 1)\)
  • Structural equations F and endogenous variables:
    • \(W = U_W\)
    • \(A = bound(2 - 0.5W + U_A, min=0, max=5)\)
    • \(Z = \mathbf{I}[U_Z < expit(2-W-A)]\)
    • \(Y = \mathbf{I}[U_Y < expit(W + 5*A + Z - 0.5 * W * A + 0.3 * W * A * (Z+1) - 8)]\)
##        W                   A                Z                Y         
##  Min.   :-4.039777   Min.   :0.0000   Min.   :0.0000   Min.   :0.0000  
##  1st Qu.:-0.687173   1st Qu.:0.5447   1st Qu.:0.0000   1st Qu.:0.0000  
##  Median :-0.015235   Median :1.9332   Median :0.0000   Median :1.0000  
##  Mean   :-0.006659   Mean   :2.0698   Mean   :0.4954   Mean   :0.5825  
##  3rd Qu.: 0.659240   3rd Qu.:3.3509   3rd Qu.:1.0000   3rd Qu.:1.0000  
##  Max.   : 4.256538   Max.   :5.0000   Max.   :1.0000   Max.   :1.0000
## Summary of A given W < -1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   1.304   2.587   2.591   3.951   5.000
## Summary of A given -1 < W <= 0:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.8416  2.1806  2.2611  3.5800  5.0000
## Summary of A given 0 < W <= 1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.3482  1.6997  1.9047  3.0925  5.0000
## Summary of A given 1 < W:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   0.000   1.129   1.473   2.480   5.000

n = 200

results

## Initial lambda mean: 0.007436044

psi(a=0.5, z= 1)

psi(a=2.5, z= 1)

psi(a=5, z= 1)

psi(a=0.5, z= 0)

Estimating ATE(0.5, 0) with z = 0

psi(a=2.5, z= 0)

Estimating ATE(0.5, 0) with z = 0

psi(a=5, z= 0)

Simulation #1_3

[Same as Simulation #1, but with a 3-way interaction and positivity violations]

Data structure: \(O = (W, A, Z, Y)\)

  • U - exogenous variables
  • W - baseline covariate that is a measure of body condition
  • A - treatment level based on W, continuous between 0 and 5
  • Z - intermediate curve based on W and A
  • Y - outcome, indicator of an event ?

Underlying data generating process, \(P_{U,X}\)

  • Exogenous variables:
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 1^2)\)
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 1^2)\)
    • \(U_Z \sim Uniform(min = 0, max = 1)\)
    • \(U_Y \sim Uniform(min = 0, max = 1)\)
  • Structural equations F and endogenous variables:
    • \(W = U_W\)
    • \(A = bound(2 - 0.5W + U_A, min=0, max=5)\)
    • \(Z = \mathbf{I}[U_Z < expit(2-W-A)]\)
    • \(Y = \mathbf{I}[U_Y < expit(W + 5*A + Z - 0.5 * W * A + 0.3 * W * A * (Z+1) - 8)]\)
##        W                   A               Z               Y         
##  Min.   :-4.039777   Min.   :0.000   Min.   :0.000   Min.   :0.0000  
##  1st Qu.:-0.687173   1st Qu.:1.217   1st Qu.:0.000   1st Qu.:0.0000  
##  Median :-0.015235   Median :1.973   Median :0.000   Median :1.0000  
##  Mean   :-0.006659   Mean   :1.993   Mean   :0.499   Mean   :0.6582  
##  3rd Qu.: 0.659240   3rd Qu.:2.731   3rd Qu.:1.000   3rd Qu.:1.0000  
##  Max.   : 4.256538   Max.   :5.000   Max.   :1.000   Max.   :1.0000
## Summary of A given W < -1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   2.013   2.671   2.701   3.362   5.000
## Summary of A given -1 < W <= 0:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   1.511   2.219   2.220   2.906   5.000
## Summary of A given 0 < W <= 1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   1.060   1.746   1.770   2.436   5.000
## Summary of A given 1 < W:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.5197  1.1890  1.2479  1.8568  4.8720

n = 200

results

## Initial lambda mean: 0.009272508

psi(a=0.5, z= 1)

psi(a=2.5, z= 1)

psi(a=5, z= 1)

psi(a=0.5, z= 0)

Estimating ATE(0.5, 0) with z = 0

psi(a=2.5, z= 0)

Estimating ATE(0.5, 0) with z = 0

psi(a=5, z= 0)